import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
  state: {
    isCollapse: false,
    isVisible: false,
    id: ""
  },
  mutations: {
    handleCollapse(state, payload) {
      state.isCollapse = payload.value;
    },
    handleVisible(state, payload) {
      state.id = payload.id;
      state.isVisible = payload.isVisible;
    },
    handleCloseVisible(state, payload) {
      state.isVisible = payload.isVisible;
    }
  },
  actions: {}
});
